package com.jcxh.sg_exam.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * @Author 鹏少
 * @Date 2024/8/9
 * @Date 10:03
 */
@Data
@ApiModel(value = "KaochangDto", description = "考场dto")
public class KaochangDto {


    /**
     * 考场名称
     */
    @ApiModelProperty(value = "考场名称", required = true)
    @NotBlank(message = "考场名称不能为空")
    private String name;

    /**
     * 考场类型
     */
    @NotBlank(message = "考场类型不能为空")
    @ApiModelProperty(value = "考场类型",required = true)
    private String type;

    /**
     * 考试开始时间
     */
    @ApiModelProperty(value = "考试开始时间 格式为:yyyy-MM-dd HH:mm:ss", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "考试开始时间不能为空")
    private LocalDateTime startTime;

    /**
     * 考试结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "考试结束时间 格式为:yyyy-MM-dd HH:mm:ss", required = true)
    @NotNull(message = "考试结束时间不能为空")
    private LocalDateTime endTime;

    /**
     * 考试时长
     */
    @ApiModelProperty(value = "考试时长", required = true)
    @NotNull(message = "考试时长不能为空")
    private Integer minute;
}